﻿using System;
using System.Collections.Generic;
using System.Text;
using DDay.iCal;
using DDay.iCal.Components;

using DataTransferObject;
using Engine.TaskVerification;
using Engine.TaskPrioritizeAlgo;
using Engine.ScheduleAlgo;

namespace Engine
{
    public class AnotherPragmaticAlgorithm //: JskeAlgorithm
    {
        //#region Constructor

        ///// <summary>
        ///// Initializes a new instance of the <see cref="AnotherPragmaticAlgorithm"/> class.
        ///// </summary>
        ///// <param name="t">The t.</param>
        ///// <param name="i">The i.</param>
        ///// <param name="f">The f.</param>
        ///// <param name="s">The s.</param>
        //public AnotherPragmaticAlgorithm(TaskList t, iCalendar i, FreeTimeList f, SystemConfiguration s)
        //{
        //    _taskList = t;
        //    _iCal = i;
        //    freeTimeList = f;
        //    systemConfiguration = s;
        //    _PrioritizeTaskList = new PrioritizeTaskList();
        //    _VerifyTaskConstraint = new VerifyTasksConstraint();
        //    _ScheduleTaskList = new ScheduleAlgorithm();
        //    PriorityReport = null;
        //    ScheduReport = null;
        //    ConstraintViolate = null;
        //}
        //#endregion

        //#region Methods Override
        //public override List<Event> run()
        //{
        //    verifyTaskConstraint();
        //    //setPriorityTaskList();
        //    return scheduleTaskList();

        //}

        ///// <summary>
        ///// Verifies the task constraint.
        ///// </summary>
        ///// <returns></returns>
        //protected override ConstraintViolation verifyTaskConstraint()
        //{
        //    ConstraintViolate = new ConstraintViolation();
        //    ConstraintViolation c = ConstraintViolate;
        //    _VerifyTaskConstraint.doTaskVerification(_taskList, freeTimeList, ref c);
        //    return c;
        //}

        ///// <summary>
        ///// Sets the priority task list.
        ///// </summary>
        ///// <returns></returns>
        //protected override PrioritizeReport setPriorityTaskList()
        //{
        //    //lấy criteria từ xml hoặc SystemConfiguration
        //    PriorityCriteria criteria = new PriorityCriteria();

        //    PriorityReport = new PrioritizeReport();
        //    PrioritizeReport p = PriorityReport;
        //    //_PrioritizeTaskList.setPriorityParameter(ref _taskList, systemConfiguration, criteria, ref p);
        //    _PrioritizeTaskList.JSKECalculatePriority();
        //    return p;
        //}

        ///// <summary>
        ///// Schedules the task list.
        ///// </summary>
        ///// <returns></returns>
        //protected override List<Event> scheduleTaskList()
        //{
        //    ScheduReport = new ScheduleReport();
        //    ScheduleReport s = ScheduReport;
        //    MapTimeToStandardCoordination();
        //    return _ScheduleTaskList.doScheduleTaskList(_taskList, freeTimeList, systemConfiguration, _iCal, ref s);
        //}

        //protected void MapTimeToStandardCoordination()
        //{
        //    _taskList.MapToStandardTime(systemConfiguration.GetStartSchedule());
        //}
        //#endregion
    }
}
